package com.sky.controller.User;

import com.sky.dto.UserLoginDTO;
import com.sky.result.Result;
import com.sky.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user/user")
public class LoginController {

    @Autowired
    private UserService userService;

    //用户登入
    @PostMapping("/login")
    public Result login(@RequestBody UserLoginDTO dto){
        return userService.login(dto);


}

}
